<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>品牌管理</title>
<link rel="stylesheet" type="text/css" href="css/bootstrap.css">
<link rel="stylesheet" type="text/css" href="css/backStyle.css">
<link rel="stylesheet" type="text/css" href="css/myButton.css">
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/bootstrap-modal.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>

<style>
html,body {
	height: 100%;
	width: 100%;
	border: 0;
	background: #fff;
	overflow-y: auto;
}
</style>
</head>

<body>
	<ul class="breadcrumb">
		<li><a href="sys/welcome.jsp">首页</a></li>
		<li class="active">品牌管理</li>
		<div style="float:right;margin-right: 8.5em">
			<input type="button" class="button white medium" style="margin-top: 0px" onclick="addBrand()" value="添加品牌">
		</div>
	</ul>
	<div class="panel panel-default">
		<div class="panel-body">
			<table class="table table-striped">
				<thead>
					<tr>
						<th style="width: 20%;">编号</th>
						<th style="width: 30%;">品牌名</th>
						<th style="width: 30%;">操作</th>
					</tr>
				</thead>
				<tbody id="brandTable">
					<s:iterator value="Blist" var="brand">
						<tr>
							<td><s:property value="#brand.id"/></td>
							<td><s:property value="#brand.brandname"/></td>
							<td><a class="button blue medium" onclick="modifyBrand('<s:property value="#brand.id"/>')">修改</a></td>
						</tr>
					</s:iterator>
				</tbody>
			</table>
		</div>
	</div>
</body>
<script type="text/javascript">
		function modifyBrand(id){
			window.location.href = "<%=basePath%>brandView.action?brand.id="+id;
		}
		
		function addBrand(){
			window.location.href = "<%=basePath%>brandAdd.action";
		}
	</script>
</html>
